package com.lyl.momanapp.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


/**
 * Fragment适配器
 * @author weizhi
 * @version 1.0
 */
public class MFragmentPagerAdapter extends FragmentPagerAdapter{
    private String[] tatle;
    private       Fragment [] fragmentsList ;
    public MFragmentPagerAdapter(FragmentManager fm, Fragment [] fragmentsList, String[] tatle) {
        super(fm);
        this.tatle=tatle;
        this.fragmentsList=fragmentsList;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentsList[position];
    }

    @Override
    public int getCount() {
        return fragmentsList.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tatle[position];
    }
}